<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
<script type="text/javascript">
	const arr=[0,0,0,0,0,1,0,0,0,2]
	const newArr =arr.filter((item)=>{
		return item!==0
	})
	console.log(newArr)
</script>
</body>
</html>